package org.qh.common.access.definition;

import lombok.Builder;
import lombok.Data;

/**
 * <p>Description: 外部程序接入必要参数 </p>
 */
@Data
@Builder
public class AccessPrincipal {

    /* ---------- 共性参数 ---------- */

    /**
     * name: "后回调时带的参数code", title: "访问AuthorizeUrl后回调时带的参数code"
     */
    private String code;

    /* ---------- 微信小程序常用参数 ---------- */

    /**
     * name: "accessCode", title: "前端调用小程序自己的方法【wx.bindgetphonenumber()】返回的accessCode"
     */
    private String accessCode;

    /**
     * name: "小程序appId", title: "小程序appId"
     */
    private String appId;

    /**
     * name: "消息密文", title: "微信小程序消息密文"
     */
    private String encryptedData;

    /**
     * name: "加密算法的初始向量", title: "微信小程序加密算法的初始向量"
     */
    private String iv;

    /**
     * name: "小程序用户openId", title: "小程序用户openId"
     */
    private String openId;

    /**
     * name: "会话密钥", title: "微信小程序会话密钥"
     */
    private String sessionKey;

    /**
     * name: "唯一ID", title: "微信唯一ID"
     */
    private String unionId;

    /**
     * name: "用户非敏感信息", title: "微信小程序用户非敏感信息"
     */
    private String rawData;

    /**
     * name: "签名", title: "微信小程序签名"
     */
    private String signature;

    /* ---------- Just Auth 标准参数 ---------- */

    /**
     * name: "后回调时带的参数auth_code", title: "该参数目前只使用于支付宝登录"
     */
    private String auth_code;

    /**
     * name: "后回调时带的参数state", title: "用于和请求AuthorizeUrl前的state比较，防止CSRF攻击"
     */
    private String state;

    /**
     * name: "华为授权登录接受code的参数名", title: "华为授权登录接受code的参数名"
     */
    private String authorization_code;

    /**
     * name: "回调后返回的oauth_token", title: "Twitter回调后返回的oauth_token"
     */
    private String oauth_token;

    /**
     * name: "回调后返回的oauth_verifier", title: "Twitter回调后返回的oauth_verifier"
     */
    private String oauth_verifier;

    /* ---------- 手机短信验证码 ---------- */

    /**
     * name: "手机号码", title: "手机短信登录唯一标识"
     */
    private String mobile;

}
